.project_clone_panel
  .row
    .span8
      .form-horizontal= render "shared/clone_panel"
    .span3.pull-right
      .pull-right
        - unless @project.empty_repo?
          - if can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
            - if current_user.already_forked?(@project)
              = link_to project_path(current_user.fork_of(@project)), class: 'btn grouped disabled' do
                %i.icon-code-fork
                Forked
            - else
              = link_to fork_project_path(@project), title: "Fork", class: "btn grouped", method: "POST" do
                %i.icon-code-fork
                Fork
          - if can? current_user, :download_code, @project
            = link_to archive_project_repository_path(@project), class: "btn grouped" do
              %i.icon-download-alt
              %span.only-wide Download

        .dropdown.pull-right
          %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
            %i.icon-plus-sign-alt
            %span.only-wide New
            %b.caret
          %ul.dropdown-menu
            - if @project.issues_enabled && can?(current_user, :write_issue, @project)
              %li
                = link_to url_for_new_issue, title: "New Issue" do
                  Issue
            - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
              %li
                = link_to new_project_merge_request_path(@project), title: "新的合并请求" do
                  合并请求
            - if @project.snippets_enabled && can?(current_user, :write_snippet, @project)
              %li
                = link_to new_project_snippet_path(@project), title: "新的片段" do
                  片段
            - if can? current_user, :push_code, @project
              %li.divider
              %li
                = link_to new_project_branch_path(@project) do
                  %i.icon-code-fork
                  Git 分支
              %li
                = link_to new_project_tag_path(@project) do
                  %i.icon-tag
                  Git 标签

            - if can?(current_user, :admin_team_member, @project)
              %li.divider
              %li
                = link_to new_project_team_member_path(@project), title: "添加项目新的成员" do
                  项目成员
